<template>
  <el-dialog :title="diaTitle" :visible.sync="isShow" :before-close="closeTabDia" width="90%" size="mini">
    <el-table
      row-key="id"
      border
      height="360"
      v-loading.fullscreen.lock="fullscreenLoading"
      :data="tableData"
      size="mini">
      <el-table-column
        v-for="(item,index) in tableColumn"
        align="center"
        :key="index"
        :prop="item.prop"
        :label="item.label"
        :fixed="item.fixed"
        :width="item.width"
      >
        <template slot-scope="scope">
          <myRender
            v-if="item.render"
            :row="scope.row"
            :render="item.render">
          </myRender>
          <span v-else>
             {{scope.row[item.prop]}}
           </span>
        </template>
      </el-table-column>
    </el-table>
  </el-dialog>
</template>

<script>
  import myRender from './tableRender';
  export default {
    name: "tableDialog",
    props: {
      tableColumn: Array,
      tableData:Array,
      isShow: Boolean,
      diaTitle:String,
      fullscreenLoading:Boolean
    },
    data(){
      return {

      }
    },
    components: {
      myRender

    },
    created() {

    },
    mounted() {

    },
    methods:{
      closeTabDia(){
        this.$emit('diaTableClosed');
      },
    }
  }
</script>

<style scoped>

</style>
